package temp;

public class sort {

    public static void sort(Integer[] arr) {
        int step = arr.length;
        while (step != 1) {
            step = step / 2;
            for (int i = step; i < arr.length; i++) {
                int c = arr[i];
                int j;
                for (j = i - step; j >= 0 && arr[j] > c; j -= step) {
                    arr[j + step] = arr[j];
                }
                arr[j + step] = c;
            }
        }
    }
}